﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MainFrame
{
    public partial class PageLoadTip : Form
    {
        public PageLoadTip()
        {
            InitializeComponent();
            this.StartPosition = FormStartPosition.CenterScreen;
            loadTips.loadTipsInLogin = TipsDisplay;
        }
        public void TipsDisplay(string tips)
        {
            if (InvokeRequired)
            {
                this.Invoke(new Action(() =>
                {
                    label1.Text = tips;
                    label1.Refresh();//强制更新控件值，不然会等UI处理完才更新
                }));
            }
            else
            {
                label1.Text = tips;
                label1.Refresh();
            }

        }
    }
}
